﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lucandra.Net
{
    internal sealed class Keyspace
    {
        private List<ColumnFamily> columnFamilies;

        public string Name { get; private set; }
        public IEnumerable<ColumnFamily> ColumnFamilies
        {
            get { return this.columnFamilies; }
        }

        public Keyspace(string name, IEnumerable<ColumnFamily> columnFamilies)
        {
            this.Name = name;
            this.columnFamilies = new List<ColumnFamily>(columnFamilies);
        }

        public override int GetHashCode()
        {
            return this.Name.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            return this.GetHashCode() == obj.GetHashCode();
        }
    }
}
